package com.jgp;

import com.jgp.sys.utils.SpringContextUtil;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

import javax.annotation.PostConstruct;
import java.util.TimeZone;

/**
 * 项目   jgp-cloud-parent
 * 作者   loufei
 * 时间   2021/4/26
 */
@Configuration
@Import(SpringContextUtil.class)
@SpringBootApplication(scanBasePackages = {"com.jgp.**.config"})
public class WarApplication extends SpringBootServletInitializer {
    
    @PostConstruct
    void started() {
        TimeZone.setDefault(TimeZone.getTimeZone("Asia/Shanghai"));
    }
    
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        
        return application.sources(WarApplication.class);
    }
    
}